package JavaSEAdvance.day06_Date;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author Xiao
 * @date 2021/7/22
 */
public class D606_LocalDateTimeDemo03 {
    public static void main(String[] args) {
        LocalDateTime dateTime = LocalDateTime.now();
        //明年今日是星期几
        LocalDateTime dateTime1 = dateTime.plusYears(1);
        System.out.println(dateTime1.getDayOfWeek());   //FRIDAY
        //上个月的一周前是星期几
        LocalDateTime dateTime2 = dateTime.minusMonths(1).minusWeeks(1);
        System.out.println(dateTime2.getDayOfWeek().getValue());   //4
    }
}
